package com.weishi.project.training.service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.IService;
import com.weishi.project.api.vo.ChannelAchievementVo;
import com.weishi.project.training.domain.TrainingGroupChannel;

/**
 * 训练小组航道Service接口
 */
public interface ITrainingGroupChannelService extends IService<TrainingGroupChannel> {

    /**
     * 查询训练小组航道列表
     */
    List<TrainingGroupChannel> selectTrainingGroupChannelList(TrainingGroupChannel trainingGroupChannel);

    TrainingGroupChannel getTrainingGroupChannelDetails(int id);

    void updateTrainingGroupChannelById(TrainingGroupChannel trainingGroupChannel);

    /**
     * 获取航道名称集合
     * @return List<TrainingGroupChannel>
     */
    List<TrainingGroupChannel> getChannelNameList();

    int getChannelIdByGroupIdAndChannelNameAndBatch(Map<String,Object> map);

    /**
     * 根据周id和dayId查询所有航道id
     * @param map
     * @return
     */
    List<TrainingGroupChannel> getTrainingGroupChannelByWeekIdAndTrainingDayId(Map<String,Object> map);

    /**
     * 根据小组id查询详情
     * @param groupId
     * @return
     */
    List<TrainingGroupChannel> getTrainingGroupChannelByGroupId(int groupId);

    /**
     * 更新小组航道其他信息(id)service 待定
     * @param trainingGroupChannel
     */
    void updateTrainingGroupChannelList(TrainingGroupChannel trainingGroupChannel);

    /**
     * 查询成绩是否存在 存在 返回true 不存在返回false
     * @param map
     * @return
     */
    boolean selectAchievementIsNull(Map<String,Object> map);

    /**
     * 查询航道成绩排名
     * @param map
     * @return
     */
    List<ChannelAchievementVo> queryChannelAchievement(Map<String,Object> map);

    /**
     *
     * @param params
     * @param setPerson 是否需要航道内人员成绩
     * @return
     */
    List<TrainingGroupChannel> qryBestTop10(Map<String, Object> params,boolean setPerson);

    /**
     * 获取训练小组航道+运动员成绩详细信息
     * @param channelId
     * @return
     */
    TrainingGroupChannel getTrainingGroupChannelAndAchievement(Integer channelId);

    boolean add(TrainingGroupChannel trainingGroupChannel);
}